package com.dapeng.cleardatabackend.model.dto.node;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @author dapeng
 * @description 节点添加请求
 * @date 2024/12/27 17:15
 */
@Data
@ApiModel(description = "节点添加请求")
public class NodeAddRequest implements Serializable {

    private static final long serialVersionUID = 431319699180079952L;

    /**
     * 图谱id
     */
    @ApiModelProperty(value = "图谱id", required = true)
    @NotNull(message = "图谱id不能为空")
    @Min(value = 1, message = "图谱id不能小于1")
    private Long graphId;

    /**
     * 节点id
     */
    @ApiModelProperty(value = "节点id")
    @NotBlank(message = "节点id不能为空")
    @Size(min = 1, max = 500, message = "节点id长度应该在1-500之间")
    private String nodeId;

    /**
     * 节点标签
     */
    @ApiModelProperty(value = "节点标签")
    @NotBlank(message = "节点标签不能为空")
    @Size(min = 1, max = 500, message = "节点标签长度应该在1-500之间")
    private String label;

    /**
     * 节点文本
     */
    @ApiModelProperty(value = "节点文本")
    @NotBlank(message = "节点文本不能为空")
    @Size(min = 1, max = 500, message = "节点文本长度应该在1-500之间")
    private String text;
}
